package com.buddy.demo.spring.event;

import org.springframework.context.ApplicationEvent;

public class SpringEvent extends ApplicationEvent {

    private String text;
    private Integer number;

    public SpringEvent(Object source) {
        super(source);
    }

    public SpringEvent(Object source, String text, Integer number) {
        super(source);
        this.text = text;
        this.number = number;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "SpringEvent{" +
                "text='" + text + '\'' +
                ", number=" + number +
                '}';
    }
}
